
<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="_fragments :: head">
</head>
<body class="app sidebar-mini">
<!-- Navbar-->
<header class="app-header" th:replace="_fragments :: bodyhead"></header>
<!-- Sidebar menu-->
<div class="app-sidebar__overlay" data-toggle="sidebar"></div>
<aside class="app-sidebar" th:replace="_fragments :: aside"></aside>
<main class="app-content">
  <div class="app-title">

    <div>
      <h1><i class="fa fa-th-list"></i> 主页面</h1>
    </div>
    <ul class="app-breadcrumb breadcrumb side">
      <li class="breadcrumb-item"><i class="fa fa-home fa-lg"></i></li>
      <li class="breadcrumb-item">主页面</li>
    </ul>
  </div>

  <div class="row">
    <div class="col-md-12">
      <div class="tile">
        <div class="tile-body">
          <div class="table-responsive">
            <ul class="app-nav">
              <li class="app-search">
                <form method="post" th:action="@{/search}">
                  <input class="app-search__input" name="title"  type="search" placeholder="Search">
                  <button class="app-search__button" type="submit"><i class="fa fa-search"></i></button>
                </form>
              </li>

            </ul>
            <table class="table table-hover table-bordered" id="sampleTable">
              <thead>
              <tr>
                <th>成果名</th>
                <th>负责人</th>
                <th>成果类型</th>
                <th>研究方向</th>
                <th>成果发表时间</th>
                <th>操作</th>
              </tr>
              </thead>
              <tbody>
              <tr th:each=" ac : ${pageInfo.list}">
                <td th:text="${ac.title}"></td>
                <td th:text="${ac.user.userName}"></td>
                <td th:text="${ac.type}"></td>
                <td th:text="${ac.direction}"></td>
                <td th:text="${#dates.format(ac.date,'yyyy-MM-dd')}"></td>


                <td>
                  <a class="" href="#" th:href="@{/toDetails/{id}(id=${ac.id})}">详情</a>
                  &nbsp&nbsp&nbsp&nbsp
                  <a class="" href="#" th:href="@{/download/{fileUrl}(fileUrl=${ac.fileUrl})}"  >下载</a>
                </td>
              </tr>
              </tbody>
            </table>

            <div>
              <a class="btn btn-primary" style="left: auto" th:href="@{/(pagenum=${pageInfo.hasPreviousPage}?${pageInfo.prePage}:1)}">上一页</a>
              <a class="btn btn-primary"  style="float: right" th:href="@{/(pagenum=${pageInfo.hasNextPage}?${pageInfo.nextPage}:${pageInfo.pages})}">下一页</a>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</main>
<!-- Essential javascripts for application to work-->
<script src="js/jquery-3.3.1.min.js" th:src="@{/js/jquery-3.3.1.min.js}"></script>
<script src="js/popper.min.js"       th:src="@{/js/popper.min.js}"></script>
<script src="js/bootstrap.min.js"    th:src="@{/js/bootstrap.min.js}"></script>
<script src="js/main.js"             th:src="@{/js/main.js}"></script>
<!-- The javascript plugin to display page loading on top-->
<script src="js/plugins/pace.min.js" th:src="@{/js/plugins/pace.min.js}"></script>
<!-- Page specific javascripts-->
<!-- Data table plugin-->
<script type="text/javascript" src="js/plugins/jquery.dataTables.min.js" th:src="@{/js/plugins/jquery.dataTables.min.js}"></script>
<script type="text/javascript" src="js/plugins/dataTables.bootstrap.min.js" th:src="@{/js/plugins/dataTables.bootstrap.min.js}"></script>


</body>
</html>